package com.wink.file.center.constant.enums;


import lombok.Getter;
import lombok.RequiredArgsConstructor;

/**
 * 文件类型
 *
 * @author wink
 * @date 2020/11/17 17:23:46
 */
@Getter
@RequiredArgsConstructor
public enum FileType {

    /**
     * 阿里云
     */
    ALIYUN(0,"阿里云"),
    /**
     * 七牛
     */
    QINIU(1,"七牛云"),

    /**
     * 本地存储
     */
    LOCAL(2,"本地存储"),
    /**
     * fastdfs存储
     */
    FASTDFS(3,"fastdfs存储");


    final Integer code;
    final String msg;

	public static FileType findByCode(Integer code) {
		for (FileType resultCode : FileType.values()) {
			if (resultCode.code.equals(code)) {
				return resultCode;
			}
		}
		return null;
	}
}
